<template>

    <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="userId" label="userId" width="180" />
        <el-table-column prop="username" label="username" width="180" />
        <el-table-column prop="password" label="password" />
    </el-table>

</template>


<script lang="ts" setup name="User">

import { ref, onMounted,reactive } from 'vue'


const tableData = ref<[]>()


function loadUserList() {

    // 原生的Fetch
    let url ='http://127.0.0.1:8080/web/user_list';
    const promise = fetch(url);

    promise.then((response)=>{
      console.log(response);
      // response.body

    });


}




onMounted(() => {
    // 获取数据
    loadUserList();

})


</script>
